/*
========================================================================
 Name        : FRamI_UISettingListSettings.cpp
 Author      : Lenka Litvova
 Copyright   : Copyright belongs to Lenka Litvova
 Description : 
========================================================================
*/
/**
 *	Generated helper class which manages the settings contained 
 *	in 'FRamI_UISettingList'.  Each CAknSettingItem maintains
 *	a reference to data in this class so that changes in the setting
 *	item list can be synchronized with this storage.
 */
 
// [[[ begin generated region: do not modify [Generated Includes]
#include <e32base.h>
#include <stringloader.h>
#include <barsread.h>
#include <FRamI_UI.rsg>
#include "FRamI_UISettingListSettings.h"
// ]]] end generated region [Generated Includes]

/**
 * C/C++ constructor for settings data, cannot throw
 */
TFRamI_UISettingListSettings::TFRamI_UISettingListSettings()
	{
	}

/**
 * Two-phase constructor for settings data
 */
TFRamI_UISettingListSettings* TFRamI_UISettingListSettings::NewL()
	{
	TFRamI_UISettingListSettings* data = new( ELeave ) TFRamI_UISettingListSettings;
	CleanupStack::PushL( data );
	data->ConstructL();
	CleanupStack::Pop( data );
	return data;
	}
	
/**
 *	Second phase for initializing settings data
 */
void TFRamI_UISettingListSettings::ConstructL()
	{
	// [[[ begin generated region: do not modify [Generated Initializers]
	SetLoudNotification( 0 );
		{
		HBufC* text = StringLoader::LoadLC( R_FRAM_I_UISETTING_LIST_ALARM_FILE );
		SetAlarmFile( text->Des() );
		CleanupStack::PopAndDestroy( text );
		}
	SetHiddenNotification( 0 );
		{
		HBufC* text = StringLoader::LoadLC( R_FRAM_I_UISETTING_LIST_TEL_NOTIFIED );
		SetTelNotified( text->Des() );
		CleanupStack::PopAndDestroy( text );
		}
		{
		HBufC* text = StringLoader::LoadLC( R_FRAM_I_UISETTING_LIST_MAIL_NOTIFIED );
		SetMailNotified( text->Des() );
		CleanupStack::PopAndDestroy( text );
		}
	SetSecurityLevel( 0 );
	// ]]] end generated region [Generated Initializers]
	
	}
	
// [[[ begin generated region: do not modify [Generated Contents]
TInt& TFRamI_UISettingListSettings::LoudNotification()
	{
	return iLoudNotification;
	}

void TFRamI_UISettingListSettings::SetLoudNotification(const TInt& aValue)
	{
	iLoudNotification = aValue;
	}

TDes& TFRamI_UISettingListSettings::AlarmFile()
	{
	return iAlarmFile;
	}

void TFRamI_UISettingListSettings::SetAlarmFile(const TDesC& aValue)
	{
	if ( aValue.Length() < KAlarmFileMaxLength)
		iAlarmFile.Copy( aValue );
	else
		iAlarmFile.Copy( aValue.Ptr(), KAlarmFileMaxLength);
	}

TInt& TFRamI_UISettingListSettings::HiddenNotification()
	{
	return iHiddenNotification;
	}

void TFRamI_UISettingListSettings::SetHiddenNotification(const TInt& aValue)
	{
	iHiddenNotification = aValue;
	}

TDes& TFRamI_UISettingListSettings::TelNotified()
	{
	return iTelNotified;
	}

void TFRamI_UISettingListSettings::SetTelNotified(const TDesC& aValue)
	{
	if ( aValue.Length() < KTelNotifiedMaxLength)
		iTelNotified.Copy( aValue );
	else
		iTelNotified.Copy( aValue.Ptr(), KTelNotifiedMaxLength);
	}

TDes& TFRamI_UISettingListSettings::MailNotified()
	{
	return iMailNotified;
	}

void TFRamI_UISettingListSettings::SetMailNotified(const TDesC& aValue)
	{
	if ( aValue.Length() < KMailNotifiedMaxLength)
		iMailNotified.Copy( aValue );
	else
		iMailNotified.Copy( aValue.Ptr(), KMailNotifiedMaxLength);
	}

TDes& TFRamI_UISettingListSettings::PIN()
	{
	return iPIN;
	}

void TFRamI_UISettingListSettings::SetPIN(const TDesC& aValue)
	{
	if ( aValue.Length() < KPINMaxLength)
		iPIN.Copy( aValue );
	else
		iPIN.Copy( aValue.Ptr(), KPINMaxLength);
	}

TInt& TFRamI_UISettingListSettings::SecurityLevel()
	{
	return iSecurityLevel;
	}

void TFRamI_UISettingListSettings::SetSecurityLevel(const TInt& aValue)
	{
	iSecurityLevel = aValue;
	}

// ]]] end generated region [Generated Contents]

